-
-
Notifications
You must be signed in to change notification settings - Fork 828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite what broke here:, ie. why events are ordered by age / timestamp at all and how that changed it. Seems like something's still failing though. Is there something we could tweak in matrix-org/matrix-js-sdk#3839 as I don't think the intention was to affect event ordering.
This is very interesting. I had this test failing initially as well. I reran it and then it worked. So there might be ambiguity in the ordering because of the changes from my pr. Is the order of any importance. Otherwise a set instead of the array would make more sense anywyas and we don't need to enforce the order somehow artificially. |
Just to get right what is happening here. Maybe mocking the age explicitly (in general for the mockEvent fn) would be a cleaner solution then? |
But changing the origin_server_ts is a good fix as well. |
I ran the failing jest test again and it passed so we have a flake |
what about this?
I think this is coming from the age now beeing dependent on Date.now(). (is th age used for timeline ordering?) |
I think the order does matter since I expect the events to be ordered in a very specific way when two timelines are merged. |
I created a draft PR: matrix-org/matrix-js-sdk#3854 |
After matrix-org/matrix-js-sdk#3839, the events are ordered on the basis of
origin_server_ts
.We just need to give the call event a larger
origin_server_ts
compared to the other events so that it appears in the same order as before i.e it appears last.This change is marked as an internal change (Task), so will not be included in the changelog.